﻿<%@ Page Title="Log In" Language="C#" AutoEventWireup="true" Theme="SkinFile" CodeFile="Login.aspx.cs"
    Inherits="Account_Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
</head>
<body>
    <form runat="server">
    <center>
        <h2>
            Log In
        </h2>
        <p>
        <asp:Label ID="lblAccessDenied" runat="server" Font-Bold="true" ForeColor="Red"></asp:Label>
            Please enter your username, password and role.
            Contact your Administrator if you don't have an account.
        </p>
        <table border="0" cellpadding="1" cellspacing="2" width="30%">
            <tr>
                <td align="center" colspan="2" style="font-weight: bold; font-size: 0.9em; color: white;
                    background-color: #5d7b9d; display: none">
                    <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2" style="font-weight: bold; font-size: 0.9em; color: white;
                    background-color: #5d7b9d">
                    Log In
                </td>
            </tr>
            <tr>
                <td align="left">
                    User Name:
                </td>
                <td align="left">
                    <asp:TextBox ID="txtUserName" runat="server" Font-Size="0.8em" Width="90%"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="txtUserName"
                        ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="left">
                    Password:
                </td>
                <td align="left">
                    <asp:TextBox ID="txtPassword" runat="server" Font-Size="0.8em" Width="90%" TextMode="Password"
                        CausesValidation="True"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="txtPassword"
                        ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="left">
                    Role
                </td>
                <td align="left">
                    <asp:DropDownList ID="ddlRole" runat="server" Width="93%">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2" style="color: red">
                    <asp:ValidationSummary ID="valSum" runat="server" />
                </td>
            </tr>
            <tr>
                <td align="right" colspan="2" style="text-align: center">
                    <asp:Button ID="LoginButton" SkinID="DefaultButton" runat="server" Text="Log In"
                        ValidationGroup="Login1" OnClick="LoginButton_Click" />
                    <asp:Button ID="btnClear" SkinID="DefaultButton" runat="server" Text="Reset" ValidationGroup="Rest"
                        OnClientClick="javascript:return false;" />
                </td>
            </tr>
            <tr>
                <td align="Left" colspan="2" style="font-size: 0.9em; color: Red;">
                    <div id="dvEror" runat="server" visible="false">
                        <b>Login Failed</b> due to following reason
                        <ol>
                            <li>User Name is Not Valid/Exists in the databse</li>
                            <li>Password is Inavlid</li>
                            <li>Combinatio of User Name and Password do not match</li>
                        </ol>
                        <i>Please try again with the valid credentials</i></div>
                </td>
            </tr>
        </table>
        <table>
        <tr>
        <td>
       
        </td>
<td>

</td>
        </tr>
        <tr>
        <td colspan="2">
       
        </td>
        </tr>
        </table>
    </center>
    </form>
</body>
</html>
